home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 2.iso / bin / startServer < prev    next >
Text File  |  1996-11-11  |  1KB  |  68 lines

  1. #!/bin/csh -f
  2.  
  3. #
  4. # update path to also look in the same directory from where this script
  5. # was executed from
  6. #
  7.  
  8. set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
  9. set DT_xconfirm = "$DT_utilities/DT_xconfirm"
  10.  
  11. set path = (${DT_util_path} $path)
  12.  
  13. # make sure CDROM_ROOT envariable is set 
  14.  
  15. if (! $?CDROM_ROOT) then
  16.     $DT_xconfirm notviewDT
  17.     exit 0
  18. endif
  19.  
  20. #
  21. # see if our server is running
  22. #
  23.  
  24. isServerRunning
  25.  
  26. if ($status == 1) then
  27.     $DT_xconfirm warn "Server is already running."
  28.     exit 0
  29. endif
  30.  
  31.  
  32. #
  33. # find out and remember the user name
  34. #
  35.  
  36. if ($?USER) then
  37.     set userName = ~$USER
  38. else
  39.     $DT_xconfirm nohome
  40.     exit 0
  41. endif
  42.  
  43.  
  44. #
  45. # make sure, server related files have been installed
  46. #
  47. if (! -e $userName/$DT_WWW_ROOT) then
  48.     $DT_xconfirm error "Server has not been installed yet.\
  49.         Please install the server and retry."
  50.     exit 0
  51. endif
  52.  
  53. #echo "$DT_utilities/dt_httpd.exe -d $userName/$DT_WWW_ROOT & "
  54.  
  55. #
  56. # invoke the server
  57. #
  58. setenv _RLD_LIST libmcd.so:libX11.so:DEFAULT
  59. setenv LD_LIBRARY_PATH $DT_utilities/lib:/lib:/usr/lib
  60. ($DT_utilities/dt_httpd.exe -d $userName/$DT_WWW_ROOT  &) > /dev/null
  61.  
  62. #
  63. # unlock, for race condition of port numbers
  64. #
  65. /usr/bin/rm  -rf    /tmp/.portlock
  66.  
  67. exit 1
  68.